{#
 This Source Code Form is subject to the terms of the Mozilla Public
 License, v. 2.0. If a copy of the MPL was not distributed with this
 file, You can obtain one at https://mozilla.org/MPL/2.0/.
#}

{% extends "firefox/releases/notes.html" %}
{% from "macros.html" import google_play_button, apple_app_store_button with context %}

{% if release.product == 'Firefox for iOS' %}
  {% set product_name = release.product %}
  {% set download_button_primary %}
    {{ apple_app_store_button(
      href=app_store_url('firefox', 'firefox-release-notes'),
      id='download-ios-primary',
      extra_data_attributes={
        'testid': 'download-ios-primary'
      }
    ) }}
  {% endset %}
  {% set download_button_secondary %}
    {{ apple_app_store_button(
      href=app_store_url('firefox', 'firefox-release-notes'),
      id='download-ios-secondary',
      extra_data_attributes={
        'testid': 'download-ios-secondary'
      }
    ) }}
  {% endset %}
{% elif release.product == 'Firefox for Android' %}
  {% set product_name = 'Firefox for Android' %}
  {% set download_button_primary %}
    {{ google_play_button(
      id='download-android-primary',
      extra_data_attributes={
        'testid': 'download-android-primary'
      }
    ) }}
  {% endset %}
  {% set download_button_secondary %}
    {{ google_play_button(
      id='download-android-secondary',
      extra_data_attributes={
        'testid': 'download-android-secondary'
      }
    ) }}
  {% endset %}
  {% set download_all_link = firefox_url('android', 'all', channel=channel_name|lower()) %}
{% elif release.product == 'Firefox' %}
  {% set product_name = 'Firefox' %}
  {% set primary_heading = 'See what’s new in Firefox!' if release.is_latest else 'Firefox Release Notes' %}
  {% set download_button_primary %}
    {{ download_firefox(dom_id='download-release-primary') }}
  {% endset %}
  {% set download_button_secondary %}
    {{ download_firefox(dom_id='download-release-secondary') }}
  {% endset %}
  {% set download_all_link = firefox_url('desktop', 'all', channel='release') %}
{% endif %}
